﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;

namespace H.Utils
{
    internal static class NativeMethods
    {

        #region 输入法切换相关
        internal const uint WM_INPUTLANGCHANGEREQUEST = 0x0050;
        internal const int HWND_BROADCAST = 0xffff;
        internal const string EN_US = "00000409";   //英文
        internal const string CN_ZH = "00000804";   //中文
        internal const uint KLF_ACTIVATE = 1;

        [DllImport("user32.dll")]
        internal static extern bool PostMessage(int hhwnd, uint msg, IntPtr wparam, IntPtr lparam);

        [DllImport("user32.dll", CharSet = CharSet.Unicode)]
        internal static extern IntPtr LoadKeyboardLayout(string pwszKLID, uint Flags);
        #endregion




    }
}
